Remove public_scan_b field#13083
Open
bettercallok wants to merge 4 commits into
Open
Conversation
for more information, see https://pre-commit.ci
Collaborator
|
Thanks for the PR, @bettercallok! @cdrini is assigned to this PR and currently has:
Possible improvements for this PR
PR triage checklist (maintainers / Richy)
Note This comment was automatically generated by PAM, Open Library's Project AI Manager. PAM provides status visibility, performs basic project management functions, and gives actionable feedback so contributors aren't left waiting. |
cdrini
reviewed
Jul 6, 2026
cdrini
left a comment
Collaborator
There was a problem hiding this comment.
Great looking very close! A few issues that were preventing this from working. I've made some fixed to now allow the rewrite to work. Can you review the changes and test things in your local environment to ensure everything is working? A few small focused tests around the new behaviour might also be helpful. Thank you @bettercallok !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11586
Refactor: Deprecates and removes the
public_scan_bSolr field and relies onebook_access:publicwhile maintaining backward compatibility for search queries.Technical
public_scan_bfromsolr_types.py,types_generator.py, and the dynamic*_bfield mappings inmanaged-schema.xml.public_scan_bextraction properties fromWorkSolrUpdaterandEditionSolrUpdater(openlibrary/solr/updater/edition.py&openlibrary/solr/updater/work.py).WorkSearchScheme(openlibrary/plugins/worksearch/schemes/works.py) to rewritepublic_scan_b:truetoebook_access:publicandpublic_scan_b:falseto-ebook_access:public. This ensures legacy URL facets won't break.openlibrary/core/models.py,openlibrary/plugins/worksearch/subjects.py, andopenlibrary/plugins/worksearch/code.pyto deducepublic_scannatively fromebook_access == "public"(or via checking ifiaexists).public_scan_bfrom UI components likeopenlibrary/templates/home/index.html,openlibrary/templates/work_search.html, and search facet templates, switching toebook_access:publiclogic where necessary.public_scan_binopenlibrary/tests/solr/updater/test_work.pyandopenlibrary/plugins/worksearch/tests/test_worksearch.py.Screenshot
N/A - Strictly backend/search logic adjustments.
Stakeholders
@cdrini